package com.mdlib.helper.api.service;


import com.mdlib.helper.model.entity.WXUser;

import retrofit2.http.GET;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by bin on 16/8/12.
 */
public interface WXApi {

    String WXHost = "https://api.weixin.qq.com/";

    @GET("sns/oauth2/access_token?")
    Observable<WXUser> getWXToken(@Query("appid") String appid,
                                  @Query("secret") String secret,
                                  @Query("code") String code,
                                  @Query("grant_type") String grant_type
    );

    @GET("sns/userinfo?")
    Observable<WXUser> getWXUserInfo(@Query("access_token") String accessToken,
                                     @Query("openid") String openId);


}
